#include <algorithm>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char **argv)
{
    if (argc < 3)
    {
        cout << "Usage: " << argv[0] << " input_file output_file" << endl;
        return 0;
    }
    ifstream is(argv[1]);
    ofstream os(argv[2]);
    istream_iterator<string> ii(cin);
    istream_iterator<string> eos;
    ostream_iterator<string> oo(cout, "\n");
    vector<string> b(ii, eos);
    sort(b.begin(), b.end());
    unique_copy(b.begin(), b.end(), oo);
    return 0;
}